-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(db/log): use logrus as logger for db #1135
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1135 +/- ##
==========================================
- Coverage 68.04% 67.23% -0.81%
==========================================
Files 411 423 +12
Lines 13752 14160 +408
==========================================
+ Hits 9358 9521 +163
- Misses 3859 4091 +232
- Partials 535 548 +13
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
db logs are not using logrus format currently. this change ensure database logs are formatted in same manner as other logs. some highlights:
VELA_DATABASE_LOG_LEVEL
- "warn" is default, pretty noisy otherwiseVELA_DATABASE_LOG_SLOW_THRESHOLD
- 200ms default, inherited from gorm defaultVELA_DATABASE_LOG_SHOW_SQL
- false is defaultVELA_DATABASE_LOG_SKIP_NOTFOUND
- true is default